<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #father {
      width: 1170px;
      height: 20px;
      margin: 0 auto;
      overflow: hidden;
      white-space: nowrap;
      box-sizing: border-box;
      /* animation: marquee 10s linear infinite; */
    }

    .microsoft {
      padding-left: 1.5em;
      /* position: relative; */
      font: 16px 'Segoe UI', Tahoma, Helvetica, Sans-Serif;
      color: rgb(102, 102, 102);
      background: rgb(255, 248, 233) none repeat scroll 0% 0%;
    }

    #child {
      display: inline-block;
      margin-left: 1200px;
    }
  </style>
</head>

<body>
  <div class="microsoft marquee" id="father">
    <span id="child">
      味多美部分产品涨价通知:
      尊敬的顾客：非常感谢您对味多美公司长
      尊敬的顾客：非常感谢您对味多美公司长
      尊敬的顾客：非常感谢您对味多美公司长
      尊敬的顾客：非常感谢您对味多美公司长

      2018.11.25
    </span>
    <span></span>
    <span></span>

    <span></span>

    <input type="text" value="210948109284">
    <button>
      复制
    </button>

  </div>
  <div style="display: none;" id="zonghang">1111</div>
</body>
<script src="./jquery-1.12.4.js"></script>
<script>
  // console.log($('#father span'), 111)
  var speed = 10;
  // child.scrollLeft = z400
  // console.log(child.scrollLeft)
  console.log(document.querySelector('.microsoft').style.width)
  console.log($('#father').width())
  setInterval(function () {
    $("#child").css('margin-left', (parseInt($("#child").css('margin-left')) - 1))
    // console.log()

    if (Math.abs(parseInt($("#child").css('margin-left'))) > ($("#child").width() + 20)) {
      // console.log(Math.abs($("#child").css('margin-left')))
      $("#child").css('margin-left', '1200px')
    }
    $('#child').css({
      'color': 'red'
    })
    // 或者
    $('#child').css(
      'color', 'red'
    )


  }, 10)
  let a = true

  function b() {
    setTimeout(function () {

      console.log($('#zonghang').css('display'), 222)

    })
  }
  b()
  if (a) {
    console.log($('#zonghang').css('display'))

    // $('#zonghang').css({
    //   'display': 'block'
    // })
    document.getElementById('zonghang').style.display = 'block'
    console.log($('#zonghang').css('display'))

  }
</script>

</html>